Namespaces

Classes

Functions

array|string|null
__(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 1004
never
abort(mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data.

at line 74
void
abort_if(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data if the given condition is true.

at line 96
void
abort_unless(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data unless the given condition is true.

at line 115
string
action(array|string $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a controller action.

at line 129
Application : mixed))
app(string|null $abstract = null, array $parameters = [])

Get the available container instance.

at line 145
string
app_id()

Get the configured application identifier for config defaults.

at line 163
string
app_path(string $path = '')

Get the path to the application folder.

at line 189
array
append_config(array $array)

Assign high numeric IDs to a config item to force appending.

at line 26
string
asset(string $path, bool|null $secure = null)

Generate an asset path for the application.

at line 205
auth(string|null $guard = null)

Get the auth manager or a specific guard instance.

at line 217
back(int $status = 302, array $headers = [], mixed $fallback = false)

Create a new redirect response to the previous location.

at line 231
string
base_path(string $path = '')

Get the path to the base of the install.

at line 241
string
bcrypt(string $value, array $options = [])

Hash the given value against the bcrypt algorithm.

at line 257
bool
blank(mixed $value)

Determine if the given value is "blank".

at line 52
broadcast(mixed $event = null)

Begin broadcasting an event.

at line 267
broadcast_if(bool $boolean, mixed $event = null)

Begin broadcasting an event if the given condition is true.

at line 277
broadcast_unless(bool $boolean, mixed $event = null)

Begin broadcasting an event unless the given condition is true.

at line 291
mixed
cache(mixed $key = null, mixed $default = null)

Get / set the specified cache value.

at line 309
bool
canPreserveConditionalTarget(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode)

Determine whether a conditional target can be preserved without broadening.

at line 985
string
class_basename(int|object|string $class)

Get the class "basename" of the given object / class.

at line 88
array
class_uses_recursive(object|string $class)

Returns all traits used by a class, its parent classes and trait of their traits.

at line 103
collect(null|Arrayable<array<array-key, mixed>>|TValue> $value = [])

Create a collection from the given value.

at line 19
mixed
config(mixed $key = null, mixed $default = null)

Get / set the specified configuration value.

at line 340
string
config_path(string $path = '')

Get the configuration path.

at line 362
bool
conflictsWithFacade(ReflectionClass $facade, MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the given method conflicts with a Facade method.

at line 1397
Repository)
context(null|array|string $key = null, mixed $default = null)

Get / set the specified context value.

at line 382
csrf_field()

Generate a CSRF token form field.

at line 417
string|null
csrf_token()

Get the CSRF token value.

at line 429
mixed
data_fill(mixed $target, array|int|string $key, mixed $value)

Fill in data where it's missing.

at line 34
mixed
data_forget(mixed $target, null|array|int|string $key)

Remove / unset an item from an array or object using "dot" notation.

at line 203
mixed
data_get(mixed $target, null|array|int|string $key, mixed $default = null)

Get an item from an array or object using "dot" notation.

at line 78
bool
data_has(mixed $target, null|array|int|string $key)

Determine if a key / property exists on an array or object using "dot" notation.

at line 47
mixed
data_set(mixed $target, array|int|string $key, mixed $value, bool $overwrite = true)

Set an item on an array or object using dot notation.

at line 142
string
database_path(string $path = '')

Get the path to the database folder.

at line 445
debug(string $message)

Log the given message when running with --verbose.

at line 248
mixed
decrypt(string $value, bool $unserialize = true)

Decrypt the given value.

at line 461
defer(callable|null $callback = null, string|null $name = null, bool $always = false)

Defer execution of the given callback.

at line 1095
class-string
determineFqcn(string $class, ReflectionClass $source)

Determine the fully qualified class name.

at line 276
dispatch(mixed $job)

Dispatch a job to its appropriate handler.

at line 474
mixed
dispatch_sync(mixed $job, mixed $handler = null)

Dispatch a command to its appropriate handler in the current process.

at line 488
string
e(BackedEnum|DeferringDisplayableValue|Stringable|float|Htmlable|int|string|null $value, bool $doubleEncode = true)

Encode HTML special characters in a string.

at line 123
string
encrypt(mixed $value, bool $serialize = true)

Encrypt the given value.

at line 500
mixed
env(string $key, mixed $default = null)

Get the value of an environment variable.

at line 150
array
env_array(string $key, array $default = [])

Get a comma-separated environment variable as an array.

at line 164
mixed
env_or_fail(string $key)

Get a required environment variable.

at line 177
mixed
event(mixed ...$args)

Dispatch an event and call the listeners.

at line 510
exceptionHandler(Throwable $exception)

Handle the uncaught exceptions.

at line 237
never
failGeneratedConstantTyping(string $message)

Report a generated constant typing failure.

at line 11
Generator
fake(string|null $locale = null)

Get a faker instance.

at line 520
mixed
feature(UnitEnum|string|null $name = null, Closure|null $whenActive = null, Closure|null $whenInactive = null)

Get the feature manager instance.

at line 14
bool
filled(mixed $value)

Determine if a value is "filled".

at line 194
string
flattenConditionalBranches(string $if, string $else)

Flatten, collapse, and deduplicate resolved conditional branches.

at line 1055
fluent(null|iterable|object $value = null)

Create a Fluent object from the given value.

at line 206
bool
fulfillsBuiltinInterface(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is for a builtin contract.

at line 1348
string|null
getModelForGuard(string $guard)

Get the model class for a guard.

at line 15
int|string|null
getPermissionsTeamId()

Get the current permissions team id.

at line 35
mixed
head(array $array)

Get the first element of an array. Useful for method chaining.

at line 240
inertia(string|null $component = null, array|Arrayable|ProvidesInertiaProperties $props = [])

Inertia helper.

at line 19
Response
inertia_location(string $url)

Inertia location helper.

at line 37
string
inferValueType(mixed $value)

Infer a PHPDoc-friendly type string from a concrete PHP value.

at line 961
void
info(Arrayable|Jsonable|Stringable|array|string $message, array $context = [], bool $callerLocation = false)

Write some information to the log.

at line 544
bool
isArrayRefinementType(string $name)

Determine whether the identifier is an array refinement.

at line 848
bool
isBuiltIn(string $type)

Determine if the type is a built-in.

at line 1153
bool
isDeprecated(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is deprecated.

at line 1333
bool
isIgnorablePhpToken(PhpToken $token)

Determine whether a PHP token can be ignored while reading syntax.

at line 1610
bool
isIntegerRefinementType(string $name)

Determine whether the identifier is an integer refinement.

at line 840
bool
isInternal(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is marked as @internal.

at line 1318
bool
isKnownOptionalDependency(string $type)

Determine if the type is known optional dependency.

at line 1168
bool
isMagic(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is magic.

at line 1307
bool
isStringRefinementType(string $name)

Determine whether the identifier is a string refinement.

at line 832
string
lang_path(string $path = '')

Get the path to the language folder.

at line 559
mixed
last(array $array)

Get the last element from an array.

at line 253
object
lazy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy instance.

at line 21
mixed
literal(...$arguments)

Return a new literal or anonymous object using named arguments.

at line 218
LoggerInterface|null
logger(Arrayable|Jsonable|Stringable|array|string|null $message = null, array $context = [])

Log a debug message to the logs.

at line 577
LoggerInterface|LogManager
logs(string|null $driver = null)

Get a log driver instance.

at line 596
string|null
mergeDocblockTypeWithNativeNullability(string|null $docblockType, string|null $nativeType)

Merge the docblock-resolved type string with the native reflection type, preserving the docblock's precision while honoring native nullability.

at line 1114
method_field(string $method)

Generate a form field to spoof the HTTP verb used by forms.

at line 606
int|null
nextSignificantPhpTokenIndex(array $tokens, int $offset)

Return the next significant PHP token index.

at line 1620
array|MethodTagValueNode
normaliseDetails(MethodTagValueNode|ReflectionMethodDecorator $method)

Normalise the method details into a easier format to work with.

at line 1416
CarbonInterface
now(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current time.

at line 618
($key is null|""|TValue : mixed)
object_get(TValue $object, null|bool|int|string $key, mixed $default = null)

Get an item from an object using "dot" notation.

at line 239
mixed
old(string|null $key = null, mixed $default = null)

Retrieve an old input item.

at line 628
TReturnType
once(callable $callback)

Ensures a callable is only called once, and returns the result on subsequent calls.

at line 268
TReturn))
optional(TValue $value = null, callable|null $callback = null)

Provide access to optional objects.

at line 290
array
parseClassUseSegments(array $segments, string $prefix = '')

Convert parsed use segments into an alias map.

at line 1713
array
parseClassUseStatement(array $tokens)

Parse the class imports from one namespace-level use statement.

at line 1637
PhpDocNode
parseDocblock(string $docblock)

Parse the given docblock.

at line 454
mixed|void
policy(object|string $class)

Get a policy instance for a given class.

at line 641
mixed
precognitive(callable|null $callable = null)

Handle a Precognition controller hook.

at line 651
string
preg_replace_array(string $pattern, array $replacements, string $subject)

Replace a given pattern with each value in the array sequentially.

at line 308
object
proxy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy proxy instance.

at line 69
string
public_path(string $path = '')

Get the path to the public folder.

at line 676
void
publishAaguids(string $destination, string $contents)

Publish the generated AAGUID catalogue atomically.

at line 8
redirect(string|null $to = null, int $status = 302, array $headers = [], bool|null $secure = null)

Get an instance of the redirector or create a redirect response.

at line 694
void
report(string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception.

at line 711
void
report_if(bool $boolean, string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception if the given condition is true.

at line 734
void
report_unless(bool $boolean, string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception unless the given condition is true.

at line 749
mixed
request(array|string|null $key = null, mixed $default = null)

Get an instance of the current request or an input item from the request.

at line 765
TFallback|TValue
rescue(callable $callback, TFallback|TFallback $rescue = null, bool|Throwable): bool $report = true)

Catch a potential exception and return a default value.

at line 793
TClass : mixed)
resolve(string $name, array $parameters = [])

Resolve a service from the container.

at line 821
string|null
resolveCanonicalClassName(string $name)

Resolve the canonical name of an existing class.

at line 312
null|string
resolveClassConstantClass(string $className, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the target class for a ConstFetchNode's className reference.

at line 941
Collection<string, class-string>
resolveClassImports(ReflectionClass $class)

Resolve the classes imports.

at line 1522
string
resolveConstFetchType(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the inferred PHP type of a class-constant fetch such as Foo::BAR or a wildcard like Foo::PREFIX_*.

at line 865
ConstExprArrayNode
resolveDefaultArrayNode(array $value, string $context)

Resolve an array into a PHPDoc constant-expression node.

at line 1828
string
resolveDefaultValue(array $parameter, string $facade, string $declaringClass, string $method)

Resolve the default value for the parameter.

at line 1776
ConstExprNode
resolveDefaultValueNode(mixed $value, string $context)

Resolve a PHP value into a PHPDoc constant-expression node.

at line 1793
MethodTagValueNode>
resolveDocMethods(ReflectionClass $class)

Resolve the classes referenced methods in the @methods docblocks.

at line 361
ReflectionClass>
resolveDocMixins(ReflectionClass $class, Collection<class-string> $encountered = new Collection())

Recursively resolve docblock mixins.

at line 1271
null|string
resolveDocParamType(ReflectionMethodDecorator $method, ReflectionParameter $parameter)

Resolve the parameters type from the @param docblocks.

at line 399
Collection<int, string>
resolveDocParameters(ReflectionMethodDecorator $method)

Resolve the classes referenced methods in the @methods docblocks.

at line 1295
Collection<class-string>
resolveDocSees(ReflectionClass $class)

Resolve the classes referenced in the docblocks.

at line 349
Collection<string>
resolveDocTags(string $docblock, string $tag)

Resolve the docblock tags.

at line 1233
null|string
resolveDocblockTypes(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode, int $depth = 1)

Resolve the types from the docblock.

at line 489
array
resolveDocblockUnionMembers(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode, int $depth)

Resolve and flatten the members of a PHPDoc union.

at line 743
Collection<int, string>
resolveIgnoredMethods(ReflectionClass $facade)

Resolve method names that should be excluded from a facade docblock.

at line 1251
resolveImportSource(ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the class whose file should be scanned for use imports when resolving types inside a method's docblock. When a method was inherited from a trait, the exact direct or nested trait source range holds the relevant use statements.

at line 1465
string
resolveKeyOrValueOf(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method, bool $keyType)

Resolve key-of<...> / value-of<...> when the inner type is a ConstFetchNode.

at line 902
MethodTagValueNode|ReflectionMethodDecorator>
resolveMethods(ReflectionClass $class)

Resolve the classes methods.

at line 1380
string
resolveName(MethodTagValueNode|ReflectionMethodDecorator $method)

Resolve the methods name.

at line 1367
array
resolveNestedTraits(ReflectionClass $class, array $resolved = [])

Resolve every direct and nested trait used by a class.

at line 1499
DynamicParameter|ReflectionParameter>
resolveParameters(ReflectionMethodDecorator $method)

Resolve the parameters for the method.

at line 1447
Collection<class-string>
resolveProxies(ReflectionClass $class)

Resolve the proxies for the Facade.

at line 263
string|null
resolveRelativeClassName(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, string $name)

Resolve a class name relative to the method that declares it.

at line 326
null|string
resolveReturnDocType(ReflectionMethodDecorator $method)

Resolve the return type from the @return docblock.

at line 433
string|null
resolveTemplateType(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, string $name, int $depth)

Resolve a template bound from the method or its declaring class or trait.

at line 788
null|string
resolveType(ReflectionMethodDecorator $method, null|ReflectionType $type)

Resolve the declared type.

at line 1182
string
resource_path(string $path = '')

Get the path to the resources folder.

at line 831
response(mixed $content = null, int $status = 200, array $headers = [])

Return a new response from the application.

at line 851
TValue
retry(array<int, float|int>|int $times, callable $callback, CarbonInterval|CarbonInterval|float|int|float|int $sleepMilliseconds = 0, null|Throwable): bool $when = null)

Retry an operation a given number of times.

at line 330
string
route(BackedEnum|string $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a named route.

at line 869
string
secure_asset(string $path)

Generate an asset path for the application.

at line 879
string
secure_url(string $path, mixed $parameters = [])

Generate a HTTPS URL for the application.

at line 889
mixed
session(array|UnitEnum|string|null $key = null, mixed $default = null)

Get / set the specified session value.

at line 903
void
setPermissionsTeamId(int|string|Model|null $id)

Set the current permissions team id.

at line 25
string
shortenImportedGlobalTypes(string $method, Collection<string, class-string> $imports)

Shorten global method types already imported by the facade.

at line 1763
array
splitClassUseSegments(array $tokens)

Split use-statement tokens into comma-separated imports.

at line 1684
array
splitTopLevelTypes(string $type, string $separator = '|')

Split a type string on a top-level separator while preserving separators inside angle brackets or parentheses.

at line 1071
string
storage_path(string $path = '')

Get the path to the storage folder.

at line 925
Stringable)
str(null|string $string = null)

Get a new stringable object from the given string.

at line 383
TValue)
tap(TValue $value, null|TValue): mixed $callback = null)

Call the given Closure with the given value then return the value.

at line 419
TValue
throw_if(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception if the given condition is true.

at line 449
TValue
throw_unless(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception unless the given condition is true.

at line 485
to_action(array|string $action, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a controller action.

at line 941
to_route(string $route, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a named route.

at line 951
CarbonInterface
today(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current date.

at line 961
array
trait_uses_recursive(object|string $trait)

Returns all traits used by a trait and its traits.

at line 500
array|string|Translator
trans(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 973
string
trans_choice(string $key, Countable|array|float|int $number, array $replace = [], string|null $locale = null)

Translates the given message based on a count.

at line 990
TReturn)
transform(null|TValue $value, callable $callback, callable(null|TDefault|TDefault $default = null)

Transform the given value if it is present.

at line 525
Uri
uri(UriInterface|Stringable|array|string $uri, mixed $parameters = [], bool $absolute = true)

Generate a URI for the application.

at line 1018
string|UrlGenerator
url(string|null $path = null, mixed $parameters = [], bool|null $secure = null)

Generate a URL for the application.

at line 1038
validator(array|null $data = null, array $rules = [], array $messages = [], array $attributes = [])

Create a new Validator instance.

at line 1056
TValue
value(TValue|TValue $value, TArgs ...$args)

Return the default value of the given value.

at line 270
view(string|null $view = null, array|Arrayable $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

at line 1077
TDefault|TValue))
when(mixed $condition, TValue|TValue $value, TDefault|TDefault $default = null)

Return a value if the given condition is true.

at line 290
bool
windows_os()

Determine whether the current environment is Windows based.

at line 543
TReturn)
with(TValue $value, callable|null $callback = null)

Return the given value, optionally passed through the given callback.

at line 560

Exceptions